dojo.provide("dojoscratch.TextCommand");

dojo.require("dojoscratch.AbstractCommand");

dojo.declare("dojoscratch.TextCommand", dojoscratch.AbstractCommand, {
	_command: function() {
		//TODO externalize? (howto?)
		var value = prompt("Value?", "");
		if (!value) {
			return;
		}
		
		var text = {
			"type" : "text",
			"text" : value,
			"x"	   : this._x1,
			"y"    : this._y1,
			"align": "start"
		};
		var fill = {
			colors : {
				color : "gray"
			}
		};
		var stroke = {
				colors : "black",
				width: 1
		};
		
		this._createScratch(text, fill, stroke);
	}
});